<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich" 
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition>
        <h:form id ="emp">
            <rich:panel header="支付文件确认列表"> 

                <h:commandButton value="确认" action="#{payfile.ConfirmPay}" />

                <h:outputLabel value="填写支票号:" />
                <h:inputText  id="ticketcode"  value="#{payfile.ticketcode}" size="25"   />
                <h:outputLabel value="备注:" />
                <h:inputText  id="memo"  value="#{payfile.memo}" size="25"   />

                <div style="width:100%;overflow: auto;">
                    <rich:dataTable id="editTable"  rows="10"  value="#{payfile.payfilelistForConfirm}" var="pflistfc"
                                    rowClasses="list-row-odd,list-row-even" style=" width: 1000px;"
                                    headerClass="table-header" >

                        <rich:column sortBy="#{pflistfc.number}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="单据编号"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.number}"/>
                        </rich:column>
                        <rich:column sortBy="#{pflistfc.voutype}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="单据种类"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="借款单"  rendered="#{pflistfc.voutype == '3'}" style="color:green"/>
                            <h:outputText value="报销单"  rendered="#{pflistfc.voutype == '0'}" style="color:red"/>
                            <h:outputText value="差旅费报销单"  rendered="#{pflistfc.voutype == '1'}" style="color:blue"/>
                            <h:outputText value="付款申请单"  rendered="#{pflistfc.voutype == '4'}" style="color:black"/>
                            <h:outputText value="支出证明单"  rendered="#{pflistfc.voutype == '5'}" style="color:#ffcf4c"/>
                            <h:outputText value="出国差旅费报销单"  rendered="#{pflistfc.voutype == '6'}" style="color:black"/>
                        </rich:column>
                        <rich:column sortBy="#{pflistfc.numDate}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="单据日期"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.numDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </rich:column>

                        <rich:column  sortBy="#{pflistfc.numberStatus}">
                            <f:facet name="header" >
                                <h:panelGroup>
                                    <h:outputText value="单据状态"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="等待审核"  rendered="#{pflistfc.numberStatus == '0'}" style="color:green"/>
                            <h:outputText value="未提交"  rendered="#{pflistfc.numberStatus == '1'}" style="color:red"/>
                            <h:outputText value="审核通过"  rendered="#{pflistfc.numberStatus == '2'}" style="color:green"/>
                            <h:outputText value="退回修改"  rendered="#{pflistfc.numberStatus == '3'}" style="color:red"/>
                            <h:outputText value="确认支付"  rendered="#{pflistfc.numberStatus == '4'}" style="color:blue"/>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.user.cpsn_name}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="人员姓名"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.user.cpsn_name}"/>
                        </rich:column>



                        <rich:column sortBy="#{pflistfc.total}">
                            <f:facet name="header"  >
                                <h:panelGroup>
                                    <h:outputText value="金额"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.total}" >
                                <f:convertNumber type="number" pattern="#,##0.00"/>
                            </h:outputText>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.auditDate}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="审核日期"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.auditDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.auditor}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="审核人"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.auditor}"/>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.checkaccount}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="核定金额"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.checkaccount}">
                                <f:convertNumber type="number" pattern="#,##0.00"/>
                            </h:outputText>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.repayment}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="还款金额"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.repayment}">
                                <f:convertNumber type="number" pattern="#,##0.00"/>
                            </h:outputText>
                        </rich:column>

                        <rich:column sortBy="#{pflistfc.remain}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="待支付金额"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:outputText value="#{pflistfc.remain}">
                                <f:convertNumber type="number" pattern="#,##0.00"/>
                            </h:outputText>
                        </rich:column>


                        <rich:column sortBy="#{pflistfc.payaccount}">
                            <f:facet name="header">
                                <h:panelGroup>
                                    <h:outputText value="支付金额"/>
                                </h:panelGroup>
                            </f:facet>
                            <h:inputText value="#{pflistfc.payaccount}"/>
                        </rich:column>

                        <f:facet name="footer">
                            <rich:dataScroller id="ds"></rich:dataScroller>
                        </f:facet>
                    </rich:dataTable>
                </div>
            </rich:panel>
        </h:form>
    </ui:composition>
</html>
